package com.power.sifa.approve.api;

import com.plf.common.domain.ResponseDTO;
import com.power.sifa.approve.model.Apl_arrive_detail;
import com.power.sifa.approve.model.pageInfo.Apl_arrive_detailPageInfo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 *  送达记录详情 Feign
 */
public interface IApl_arrive_detailFeign {

    /**
     * 送达记录详情分页列表
     */
    @PostMapping("/apl_arrive_detail/list")
    ResponseDTO list(@RequestBody Apl_arrive_detailPageInfo apl_arrive_detailPageInfo);

    /**
     * 查看送达记录详情
     */
    @GetMapping("/apl_arrive_detail/view")
    ResponseDTO view(@RequestParam("id") String id);

    /**
     * 删除送达记录详情
     */
    @PostMapping("/apl_arrive_detail/delete")
    ResponseDTO delete(@RequestParam("id") String id);

    ///**
    // * 查看送达记录详情 复合主键使用
    // */
    //@PostMapping("/apl_arrive_detail/viewByPK")
    //ResponseDTO viewByPK(@RequestBody Apl_arrive_detail.Apl_arrive_detailPK pk);

    /**
     * 修改或保存送达记录详情
     */
    @PostMapping("/apl_arrive_detail/save")
    ResponseDTO save(@RequestBody Apl_arrive_detail apl_arrive_detail);

    ///**
    // * 删除送达记录详情 复合主键使用
    // */
    //@PostMapping("/apl_arrive_detail/deleteByPK")
    //ResponseDTO deleteByPK(@RequestBody Apl_arrive_detail.Apl_arrive_detailPK pk);

    /**
     * 批量删除送达记录详情
     */
    @PostMapping("/apl_arrive_detail/batchDel")
    ResponseDTO batchDel(@RequestParam("ids") String ids);

    /**
     * 导出excel
     */
    @PostMapping("/apl_arrive_detail/output")
    void output(HttpServletResponse response, @RequestBody Apl_arrive_detailPageInfo apl_arrive_detailPageInfo);

    /**
     * 导出excel模板
     */
    @PostMapping("/apl_arrive_detail/exportExcelTemplate")
    void exportExcelTemplate(HttpServletResponse response);

    /**
     * 导入excel
     */
    @PostMapping("/apl_arrive_detail/importExcel")
    ResponseDTO importExcel(@RequestBody MultipartFile file) throws IOException;


    /**
     * 暂存接口
     *
     * @param details 详情记录数据
     * @return
     */
    @PostMapping("/apl_arrive_detail/saveTemp")
    ResponseDTO saveTemp(@RequestBody List<Apl_arrive_detail> details);

    /**
     * 一键送达接口
     *
     * @param details      详情记录数据
     * @param sendUserId   送达人id
     * @param sendUserName 送达人名称
     * @return
     */
    @PostMapping("/apl_arrive_detail/saveSend")
    ResponseDTO saveSend(@RequestBody List<Apl_arrive_detail> details, @RequestParam("sendUserId") String sendUserId, @RequestParam("sendUserName") String sendUserName);


    /**
     * 自定义材料类型送达详情新增
     *
     * @param detail 详情记录数据
     * @return
     */
    @PostMapping("/apl_arrive_detail/saveNewDetail")
    ResponseDTO saveNewDetail(@RequestBody Apl_arrive_detail detail);

    /**
     * 送达送达人，第三人详情页面
     *
     * @param applyid
     * @return
     */
    @PostMapping("/apl_arrive_detail/getReviewDetailByApplyid")
    ResponseDTO getReviewDetailByApplyid(@RequestParam("applyid") String applyid);


    /**
     * 通过案号匹配对应的送达树结构
     *
     * @param applyid 案号
     * @return
     */
    @PostMapping("/apl_arrive_detail/getDocumentTree")
    ResponseDTO getDocumentTree(@RequestParam("applyid") String applyid);


    /**
     * 根据userid查询待处理的通知
     *
     * @param userid
     * @return
     */
    @PostMapping("/apl_arrive_detail/getByUserid")
    ResponseDTO getByUserid(@RequestParam String userid);

    /**
     * 根据applyid查询最近一条待处理的通知
     *
     * @param applyid
     * @return
     */
    @PostMapping("/apl_arrive_detail/getByApplyid")
    ResponseDTO getByApplyid(String applyid);


    /**
     * 根据id删除一条送达记录信息
     *
     * @param id
     * @return
     */
    @PostMapping("/apl_arrive_detail/deleteDetailById")
    ResponseDTO deleteDetailById(String id);

}
